﻿@using CleanArchitecture.Core.Helper
@{
    Layout = "_BackendLayout";
    ViewData["Title"] = ViewBag.PageTitle as string;
}

<div class="systemauthorizemanage layui-main">
    <div class="layui-container layui-col-220" style="padding: 0;">
        <div class="layui-nav-custom-title">@ViewBag.PageTitle</div>
        <div class="layui-row layui-nav-custom-content organizetree"></div>
    </div>
    <div class="layui-container layui-col-220 l220" style="padding: 0;">
        <div class="layui-nav-custom-title">角色列表</div>
        <div id="roleslist" class="layui-row layui-nav-custom-content">

        </div>
    </div>
    <div id="rightpanel" class="right-col-body l440" style="margin: 5px;">
        <form class="layui-form">
            <fieldset class="layui-elem-field">
                <div class="layui-field-box">
                    <div class="layui-row pagebuttongroup">
                        @await Component.InvokeAsync("PageButton")
                    </div>
                </div>
            </fieldset>

            <table id="systemauthorizetable"></table>
        </form>
    </div>
</div>
@await Component.InvokeAsync("RecordButton")
<script id="roleslistTpl" type="text/html">
    <ul class="list-items">
        {{#  layui.each(d, function(index, item){ }}
        <li class="list-item">
            <a href="javascript:;" data-id="{{item.Id}}">
                {{ item.RoleName }}
                {{#  if(item.IsAdmin > 0){ }}
                <span class="layui-badge-dot toolgroup" data-tips="系统管理员"></span>
                {{#  } }}
            </a>
        </li>
        {{#  }); }}
        {{#  if(d.length === 0){ }}
        无数据
        {{#  } }}
    </ul>
</script>
<script type="text/html" id="isActiveTpl">
    <input type="checkbox" name="moduleauthorize" value="{{d.Id}}" data-id="{{d.Id}}" data-pid="{{d.ParentId}}" lay-filter="systemmoduleauthorize" lay-skin="switch" lay-text="ON|OFF" {{ d.IsActive ? 'checked' : '' }} />
</script>
@section scripts{
    <script src="~/js/backend/systemmanage/systemauthorizemanage.min.js" charset="utf-8" asp-append-version="true"></script>
}
